package com.zhijian.wharf.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author HCG
 * @version 1.0
 * @date 2024-07-07
 */
@AllArgsConstructor
@Getter
public enum ThirdPartyDockingStatusEnum {

    WAIT_APPROVE(0, "待审核"),
    PASS(1, "已通过"),
    REJECT(2, "已拒绝"),
    ;

    private Integer code;
    private String desc;

    public static ThirdPartyDockingStatusEnum getByCode(Integer code) {
        ThirdPartyDockingStatusEnum[] values = ThirdPartyDockingStatusEnum.values();
        for (ThirdPartyDockingStatusEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }

}
